angular.module('mamApp').config(["w5cValidatorProvider", function (w5cValidatorProvider) {

    // 全局配置
    w5cValidatorProvider.config({
        blurTrig: true,
        showError: true,
        removeError: true

    });

    w5cValidatorProvider.setRules({
        email: {
            required: "输入的邮箱地址不能为空",
            email: "输入邮箱地址格式不正确"
        },
        username: {
            pattern: "用户名必须输入汉字",
            minlength: "用户名长度不能小于{minlength}",
            maxlength: "用户名长度不能大于{maxlength}"
        },
        realName: {

            minlength: "用户名长度不能小于{minlength}",
            maxlength: "用户名长度不能大于{maxlength}",
            pattern: "用户名必须输入汉字"
        },
        nickName: {
            pattern: "昵称必须输入字母、数字、下划线，以字母开头",
            minlength: "昵称长度不能小于{minlength}",
            maxlength: "昵称长度不能大于{maxlength}"
        },
        summary: {
            minlength: "简介长度不能小于{minlength}",
            maxlength: "简介长度不能大于{maxlength}"
        },
        password: {
            required: "",
            pattern: "密码必须输入6到16字母、数字结合. 区分大小写"
        },
        newpwd: {
            pattern: "密码必须输入6到16字母、数字结合. 区分大小写"
        },
        repeatPassword: {
            repeat: "两次密码输入不一致"
        },
        number: {

        },
        customizer: {
            customizer: "自定义验证数字必须大于上面的数字"
        },
        myValidate: {
            required: "自定义信息不能为空",
            customizer: "验证不通过"
        },
        dynamicName: {
            required: "动态Name不能为空"
        },
        dynamic: {
            required: "动态元素不能为空"
        },
        companyName: {
            minlength: "机构名称长度不能小于{minlength}",
            maxlength: "机构名称长度不能大于{maxlength}"
        },
        idCard: {
            pattern: "身份证格式不正确"
        },
        businessLicenseNum: {
            pattern: "注册号的格式不正确"
        },
        idCardFrontUrl: {
            required: "请上传身份证"
        },
        businessLicenseUrl: {
            customizer: "请上传营业执照"

        },
        idCardBackUrl: {
            required: "请上传身份证"
        },
        phoneNumber: {
            pattern: "手机号格式不正确"
        },
        landlineNumber: {
            pattern: "座机号格式不正确",
            maxlength: "座机号长度不能大于{maxlength}"
        },
        address: {
            pattern: "地址不能为纯数字或纯英文"
        },
        citySelected: {
        },
        albumName: {
            minlength: "专辑名称长度必须大于{minlength}",
            maxlength: "专辑名称长度必须小于{maxlength}"
        },
        programmeName: {
            minlength: "节目名称长度必须大于{minlength}",
            maxlength: "节目名称长度必须小于{maxlength}"
        },
        audio: {
            min: "&nbsp"
        },
        category: {
            required: "专辑一级频道必须选择"
        },
        channelSelected: {
            min:"所选标签数目不能小于{min}",
            max: "所选标签数目不能大于{max}"
        },
        speChannelSelected: {
            min:"所选标签数目不能小于{min}",
            max: "所选标签数目不能大于{max}"
        },
        keyword: {
            customizer: "关键词长度纯中文1-4个字，纯英文12个字母，最多5个关键词"
        },
        anchorName: {
            customizer: "每个主播名字2-20字(多个主播用逗号或分号做区隔)，最多5个主播"
        },
        originalName: {
            customizer: "每个原创名字2-20字(多个原创用逗号或分号做区隔)，最多5个原创"
        },
        bankName: {
            maxlength: "开户银行长度不能大于{maxlength}",
            pattern: "开户银行格式不正确"
        },
        bankAccount: {
            required: "手机号不能为空",
            maxlength: "开户银行长度不能大于{maxlength}",
            pattern: "银行卡号格式不正确"
        },
        payee: {
            required: "手机号不能为空",
            maxlength: "收款人长度不能大于{maxlength}",
            pattern: "收款人格式不正确"
        }
    });
}]);